Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add update_or_create_hierarchy_from_dataframe Function #944

Merged
merged 3 commits into from
Sep 19, 2023

Conversation

MariusWirtz
Copy link
Collaborator

@MariusWirtz MariusWirtz commented Jul 26, 2023

Create or Update Hierarchy based on data frame

Create or update an existing hierarchy based on data frame.
Attribute columns can be suffixed with a,s, or n to control the
attribute type.
Edges and Weights are created according to the provided level columns

Function supports

  • multiple parents
  • duplicate records
  • explicit or implicit (through level columns) consolidation records
  • optional unwind before manipulation
  • attribute update
  • imbalanced hierarchies

Function checks df before creation for:

  • invalid alias
  • contradictory records

@MariusWirtz MariusWirtz force-pushed the feature/update-or-create-hierarchy-from-df branch from 54a3827 to 13b95ee Compare July 26, 2023 13:58
@MariusWirtz MariusWirtz marked this pull request as ready for review September 6, 2023 20:10
@MariusWirtz MariusWirtz force-pushed the feature/update-or-create-hierarchy-from-df branch 3 times, most recently from 5e5ae28 to 6121379 Compare September 12, 2023 10:57
@MariusWirtz MariusWirtz changed the title Update elements, edges and attributes based on df Add update_or_create_hierarchy_from_dataframe Function Sep 13, 2023
Create or update an existing hierarchy based on dataframe.
Attribute columns can be suffixed with a,s or n to control the
attribute type.
Edges and Weights are provided according to the provided level columns

Function supports
- multiple parents
- duplicate records
- explicit or implict (through level columns) consolidation records
- optional unwind before manipulation
- attribute update
- imbalanced hierarchies

Functions checks df before creation for:
- invalid alias
- contradictory records
@MariusWirtz MariusWirtz force-pushed the feature/update-or-create-hierarchy-from-df branch from 6121379 to 2e72406 Compare September 18, 2023 17:36
Copy link
Collaborator

@vmitsenko vmitsenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests completed

TM1py/Services/HierarchyService.py Outdated Show resolved Hide resolved
TM1py/Services/HierarchyService.py Outdated Show resolved Hide resolved
TM1py/Services/HierarchyService.py Show resolved Hide resolved
@MariusWirtz MariusWirtz merged commit 333efa1 into master Sep 19, 2023
MariusWirtz added a commit that referenced this pull request Sep 25, 2023
MariusWirtz added a commit that referenced this pull request Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants